home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
World of Education
/
World of Education.iso
/
world_p
/
pcshx10b.zip
/
PCSHX10B.EXE
/
UTILS.EXE
/
UTILDOCS.EXE
/
GET.DOC
< prev
next >
Wrap
Text File
|
1989-08-30
|
8KB
|
118 lines
GET -- Bob Stephan's Batch file enhancer -- a public domain utility
Syntax: GET command argument
Purpose Command Argument Environment Errorlevel Extended
--------- ------- -------- --(GET=)--- --(Exit)-- --[E]---
Get character C[E] ["prompt"] [chars] Character ASCII dec. No Echo
Get yes/no aNswer N[E] ["prompt"] None Character ASCII dec. No Echo
Get string S[E] ["prompt"] None String Length No Echo
Moving Text(GetaKey)T[E] "Filespec" [chars] Character ASCII dec. No Echo
Get DOS version D[E] None Major Vers. MajorMinor MinorEnv
Get environment left E[E] None Bytes left Bytes left Bytes/10
Get file size (0=DIR) F[E] Filespec Hex bytes Kilobytes Kb/10
Get disk space K[E] [driveletter] Kilobytes Kilobytes Kb/10
Get memory free M[E] None Kilobytes Kilobytes Kb/10
Clear (Blank) Screen B [New attribute] Current or last attr. None
Check for printer P None 1=yes,0=no 1=yes,0=no None
Get/set video mode V [New mode] Current or last mode None
Check coprocessor 7 None 1=yes,0=no 1=yes,0=no None
Check for ANSI.SYS A None 1=yes,0=no 1=yes,0=no None
Get current directory Y None Directory Level/Drive Drive
Surrogate character args: } is Carriage Return, ~ is Escape, ` is Extended.
Explanations:
To display the above screen, enter GET with no arguments, or GET ?.
C, Commands are single characters or a character and [optionally] E with
no spaces between. The E indicates the Extended function above.
N, the yes/No answer will accept y,Y,n,N, carriage return, or Esc.
B, the screen Blanker, does not change your color settings unless
you give it an attribute to use, and it will work with any number
of lines on the screen (e.g. EGA 43 or VGA 50).
[] brackets indicate optional portions of commands and/or arguments. The
command will work regardless whether these portions are included or not.
Where double quotes ("'s) are shown, they must be included as shown
if the corresponding command/argument is used.
A filespec may include drive and path but no wild cards.
[chars] are optional characters that limit the user input to just
the characters given. This should be a contiguous character
string separated from the prompt, if given, by a space.
Single characters are taken without pressing Enter.
(Strings, of course, will require the user to press Enter.)
The comparison of characters is not case sensitive. To
indicate that a carriage return, Esc, or Extended key is
acceptable, include the surrogate character listed above. CR and Esc
will return 125 and 126 in the errorlevel respectively. If
no chars are given, any key stroke will be accepted. If extended
keyboard characters are specified, the scan code will be in the
errorlevel and the corresponding ASCII byte in the environment
preceeded by "`". A table of keyboard scan codes will be useful.
Environment: this column indicates what will be found in the
environment string GET=. This string can be accessed from a
BATch file with the %GET% notation.
Errorlevel: this column indicates what value will be placed in the
DOS errorlevel that can be accessed in BATch files with the
"if errorlevel" subcommand.
Extended: this column indicates the action taken if the optional
"E"xtended command is included. The values/10 refer to errorlevel
return codes reduced by a factor of 10, useful for large values.
The drive for the Y command will be in both places. The minor DOS
version (e.g., the 1 in 3.1) will be in the environment, but the
errorlevel will have (major*10)+minor in either case (e.g. 31).
T, the Moving Text feature, requires a file with the prompt string that
will be displayed moving across the bottom line of the screen.
Currently only standard 25 line screens are supported. The text
file should be plain ASCII without any control characters (No CR,
LF, or any other characters below ASCII 32). To be effective
the prompt must be over 80 characters long, and to ensure
smooth wrap-around the first 79 characters should be repeated
at the end. The maximum length for the text of the moving
prompt is 4096 characters. Over that it will be truncated.
Use COPY CON to create text and end with an F6. For small files of less
than 79 chars, copy the file to itself as necessary . ie;
copy filename.one+filename.one filename.two
V: don't fool around with Video mode unless you know what you're doing!
You may want to clear GET from the environment at the end of the .BAT file
with GET=
GET is programmmed in assembly language for MS-DOS computers. If you need
more BATch programming capability than is included here, I suggest you
look into the Shareware product, Extended Batch Language or EBL. However,
you will probably have to pay a licensing fee for EBL, and GET is FREE!
Portions of the code for GET were adapted from the sample program named
WHAT.ASM included with Microsoft Macro Assembler (MASM). The MASM
documentation declares that the sample programs are in the public domain.
For examples of GET, look at the BATch files on the MASDIR disk for the
use of a similar program called SDL_GET. You can do a lot in BATch
programming with this utility. It remains in the public domain for all to
enjoy. /s/Bob Stephan May 23, 1989
If you have any questions, comments, or suggestions please contact me at:
MOBY DISK: 1021 San Carlos Road, Pebble Beach, CA 93953
Phone: (408) 646-1899, 646-1373. GENIE:MOBYDISK. COMPUSERVE:72357,2276
Now for the commercial: If you like GET you will love MASDIR!
MASDIR (pronounced 'master') the MASter DIRectory System, is a general
purpose sorted directory program with unique disk label printing and
customization features. If you ever use DIR, you should do yourself a
favor and take a look at MASDIR. The main program, SDL.COM, is one of the
best sorted directory programs anywhere. The setup program allows you to
set the many defaults to your own specifications, including customizing
the titles that appear in the header. In addition, you can print disk
labels and or sleeve inserts for 5.25" and 3.5" diskettes. This really
saves you a lot of time when you are looking through your collection of
diskettes for a particular file. They are all listed conveniently along
with your own description in the title lines. You can also create disk
file catalogs of your diskettes and directories that you can then
annotate to describe individual files.
As of the above date, the current release of MASDIR is Version 4.3. It is
a shareware program that is available on bulletin boards, GENIE,
CompuServe, The Public (software) Library, and from other distributors of
public domain and shareware programs. If you cannot conveniently locate a
copy, I will be happy to send you one. Just contact me as indicated
above. Thank you for your kind attention. /Bob/